package com.skivingcloud.admin.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;

import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 通用业务数据表(业务的表单数据）
 * </p>
 *
 * @author skivingcloud
 * @since 2022-07-07
 */
@TableName(value = "sys_business_common" , autoResultMap = true)
@ApiModel(value = "SysBusinessCommon对象", description = "通用业务数据表(业务的表单数据）")
public class SysBusinessCommon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("版本")
    private Integer version;

    @ApiModelProperty("设计的id，sys_business_designer.id")
    private String designerId;

    @ApiModelProperty("应用设计编码")
    private String designerCode;

    @ApiModelProperty("表单数据")
    @JsonProperty
    @TableField(value = "form_data", typeHandler = JacksonTypeHandler.class)
    private JsonNode formData;

    @ApiModelProperty("创建人")
    private String creater;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("最后修改人")
    private String modUser;

    @ApiModelProperty("修改时间")
    private LocalDateTime modTime;

    @ApiModelProperty("租户")
    private String tenantId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
    public String getDesignerId() {
        return designerId;
    }

    public void setDesignerId(String designerId) {
        this.designerId = designerId;
    }
    public String getDesignerCode() {
        return designerCode;
    }

    public void setDesignerCode(String designerCode) {
        this.designerCode = designerCode;
    }
    public JsonNode getFormData() {
        return formData;
    }

    public void setFormData(JsonNode formData) {
        this.formData = formData;
    }
    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getModUser() {
        return modUser;
    }

    public void setModUser(String modUser) {
        this.modUser = modUser;
    }
    public LocalDateTime getModTime() {
        return modTime;
    }

    public void setModTime(LocalDateTime modTime) {
        this.modTime = modTime;
    }
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public String toString() {
        return "SysBusinessCommon{" +
            "id=" + id +
            ", version=" + version +
            ", designerId=" + designerId +
            ", designerCode=" + designerCode +
            ", formData=" + formData +
            ", creater=" + creater +
            ", createTime=" + createTime +
            ", modUser=" + modUser +
            ", modTime=" + modTime +
            ", tenantId=" + tenantId +
        "}";
    }
}
